<?php	$atr=array(
					"name"=>"SIHI",
					"onsubmit"=>"return checkSIHI()"
				  ); 
	echo form_open('SIHI',$atr); ?> 
<?php $bar="Lab List" ;?>
<table id="box-table-a" cellspacing="1" align="right" width="900px">
 	<tr><td colspan=8 align=right class=bar><?php echo $bar;?></td></tr>
   		<tr>
   			<th>SIHI_ID</th>
   			<th>SI_Book_No</th>
   			<th>IssuedDate1</th>
   			<th>HI_Card_No</th>
   			<th>IssuedDate2</th>
   			<th>ExpiredDate</th>
   			<th>RegisteredHospital</th> 
   			<th>Action</th>  			
   		</tr> 		
  		
<?php if (isset($result)){?>
   	
   		<?php foreach ($result as $row):?> 
		<tr>			
			<td class="row1"><?php echo $row->SIHI_ID; ?> </td>
			<td class="row1"><?php echo $row->SI_Book_No;?> </td>
			<td class="row1"><?php echo $row->IssuedDate1 ;?> </td>
			<td class="row1"><?php echo $row->HI_Card_No;?> </td>
			<td class="row1"><?php echo $row->IssuedDate2 ;?> </td>
			<td class="row1"><?php echo $row->ExpiredDate ;?> </td>
			<td class="row1"><?php echo $row->RegisteredHospital ;?> </td>
			<td class="row1" align="center">
				 <?php echo '<id=a>'.anchor("SIHI/edit/$row->SIHI_ID",'<img src ="'.base_url().'templates/images/icons/edit.gif" title="Click here to modify"/>').'</a>';?>
				 <?php echo '<id=a  onclick="return checkLink();">'.anchor("SIHI/delete/$row->SIHI_ID",'<img src ="'.base_url().'templates/images/icons/delete.png" title="Click here to delete"/>').'</a>';?> 
			</td>		
		</tr>	   
 		<?php endforeach; ?>				
   		<tr>   			
   			<td><input type="text" name ="SIHI_ID" class="shu" size="10" /></td>
   			<td><input type ="text" name ="SI_Book_No" class="shu" size="10"/></td>
   			<td><input type ="text" name ="IssuedDate1" class="work" size="10"  onkeyup="dtval(this,event)" maxlength="10"/></td>
   			<td><input type ="text" name ="HI_Card_No" class="shu" size="10"/></td>
   			<td><input type ="text" name ="IssuedDate2" class="work" size="10" onkeyup="dtval(this,event)" maxlength="10"/></td>
   			<td><input type =text" name ="ExpiredDate" class="work" size="10" onkeyup="dtval(this,event)" maxlength="10"/></td>
   			<td><input type ="text" name ="RegisteredHospital" size="10"/></td>   			
   			<td align="center"><input type="submit" id="submit" value="insert"/> </td>
   		</tr>
   		<tr>
   			<td colspan="8">	<?php echo $this->pagination->create_links(); // tạo link phân trang?>  </td>
   		</tr>
   		<tr>
   			<td colspan="8" id="abc"> 
   				<?php if (isset($error)){
					echo "<br/>";   			
			   		echo $error;
					echo '<br/>';
					form_close();
		   		}?>
		   		
		   	 </td>
   		</tr>
   	</table> 		  	
   	    			   	
 <?php }?>
